package com.simplerobot.robot.tieba;

import us.codecraft.webmagic.model.annotation.ExtractBy;
import us.codecraft.webmagic.model.annotation.TargetUrl;

@TargetUrl("http://tieba.baidu.com/p/*")
public class TieBa {


    //帖子标题
    @ExtractBy(value = "//h1[@class='core_title_txt']/text()", notNull = true)
    private String title;
    //作者
    @ExtractBy(value = "//a[@class='p_author_name j_user_card']/text()", notNull = true)
    private String author;
    //帖子内容
    @ExtractBy(value = "//div[@class='d_post_content j_d_post_content  clearfix']/text()" ,notNull = true)
    private String context;
    public String getUrls() {
        return urls;
    }

    public void setUrls(String urls) {
        this.urls = urls;
    }

    private String urls;

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
